#include <SDL/SDL.h>

#include <cstring>
#include <cstdlib>
#include <iostream>

#include "../include/error.h"

int main(int argc, char const* argv[]) {
    bool done = false;
    
    SDL_Surface *screen;
    Error *error = new Error();
    
    //SDL_Init(SDL_INIT_EVERYTHING);
    
    {
        Uint32 videoFlag = SDL_HWSURFACE | SDL_DOUBLEBUF;
        
        for(int i = 1; i < argc; i++){
            if(strcmp(argv[i], "--fullscreen") == 0 || strcmp(argv[i], "-f") == 0)
                videoFlag = videoFlag | SDL_FULLSCREEN;
            else if(strcmp(argv[i], "--help") == 0 || strcmp(argv[i], "-h") == 0){
                std::cout << "Usage: gopii [OPTION]\n\n" <<
                             "Options:\n" <<
                             "  -f, --fullscreen\tenable fullscreen mode\n" <<
                             "  -h, --help\t\tdisplay this help and exit\n" <<
                             "\nThanks for install me!! :)\n";
                exit(0);
            } else
                error->errorNumber(1, argv[i]);
        }
    }
    
    while(!done){
        
    
    }
    
    return 0;
}


/*
#include "manager.h"
#include "map.h"
#include "image.h"
#include "font.h"

#include "SDL/SDL_ffmpeg.h"

#include <string>
#include <stdio.h>

/*
Falta implementar:  música
                    efeitos sonoros
*

int main(int argc, char** argv){
    bool done = false;
    SDL_Event event;

    Manager* manager = new Manager();

    while(!done){
        //EVENTS
        while(SDL_PollEvent(&event)){
            switch(event.type){
                case SDL_QUIT:
                    done = true;
                    break;
                case SDL_KEYDOWN:
                    switch(event.key.keysym.sym){
                        case SDLK_ESCAPE:
                            done = true;
                            break;
                    }
                    break;
            }
        }

        //LOGIC
            //CHOOSE RESOLUTION

        //RENDER


        manager->delayFrame(1);
    }

    manager->~Manager();


    return 0;
}
*/
